package com.ai.smlcore.util;

import java.util.HashMap;
import java.util.Map;

/**
 * 常量类
 */
public final class Constants {
	public static final String MERCHANT_CHNL_ID = "1418";// 商户账户渠道
	public static final String SYSAPPID = "1400";// 系统id
	// 0 代表无效 ，1 代表有效
	public static final String VALIDSTSCD = "1";
	// 商品图片FTP远程路径
	public static final String FTP_PATH = "image/";
	// 商品正面图文件名
	public static final String BIG_IMAGE = "1_big.jpg";
	public static final String SMALL_IMAGE = "1_small.jpg";
	public static final String ORIGINAL_IMAGE = "1_original.jpg";
	// 商品宣传广告图片前缀
	public static final String AD_IMAGE_PREFIX = "ad_";
	/**  */
	public interface ENV {
		String DEVELOP = "develop";
		String TEST = "test";
		String PRODUCT = "product";
	}

	public interface SYS_CONFIG {
		String REMOTE_MQ_IP_PORT = "REMOTE_MQ_IP_PORT";// MQ的IP配置
		String REMOTE_MQTT_IP_PORT = "REMOTE_MQTT_IP_PORT";// MQTT的IP端口配置

	}

	public interface SYSTEM_PROP_CONFIG {
		String ESB_CLIENT_ID = "ESB_CLIENT_ID";
		String REDIS_ADDR_CFG = "REDIS_ADDR_CFG";// Redis IP地址配置，各ip之间以半角逗号","分隔
		String REDIS_CFG_SPLIT = ",";// 分隔符
		String END_VALID_TIME = "9999-12-30 23:59:59";
		String APP_SYS_ID = "1001";// 应用系统编号
		String FLAG_YES = "1";
		String FLAG_NO = "0";
		String FLAG_O2O = "2";// O2O导入订单
		/**
		 * 系统默认的时间格式
		 */
		String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
		/**
		 * 国家代码
		 */
		String CRY_CD = "10";
	}

	/**
	 * restful动作常量
	 */
	public interface RESTFUL_ACTION {
		/**
		 * SCOPE ACTION
		 */
		String SCOPE = "scope";
		/**
		 * GET ACTION
		 */
		String ACT_GET = "GET";
		/**
		 * PUT ACTION
		 */
		String ACT_PUT = "PUT";
		/**
		 * POST ACTION
		 */
		String ACT_POST = "POST";
		/**
		 * DELETE ACTION
		 */
		String ACT_DELETE = "DELETE";

		/**
		 * 服务业务别名
		 */
		String BUSI_ESB = "esb";

	}

	public interface MQ_TOPIC {
		String SUPPLIER_ACCOUNT = "TOPIC_SUPPLIER_ACCOUNT"; // 供应商即时账
	}

	public interface BUSICODE {
		String BUSINESS = "BUSINESS";
		String FLOW = "FLOW";
		String ORDER = "ORDER";
		String CUST = "CUST";
		String GOODS = "GOODS";
	}

	/** 账户变得类型 */
	public interface ACC_CHG_TYPE {
		/** 充值 */
		String RECHARGE = "1";
		/** 消费 */
		String CONSUME = "-1";
		/** 回退消费 */
		String BACK = "-2";
	}

	/** 省份 */
	public interface PROVINCE {
		/** 未知 */
		String UNKNOWN = "000";
		/** 全国 */
		String ALLPROVINCE = "001";
	}

	public enum ROUTE_RESULT {
		RESULT00("00", "下单成功"), RESULT01("01", "未知号码未指定路由"), RESULT02("02", "未知号码指定供应商未开通"), RESULT03("03",
				"未知号码指定供应商合同到期"), RESULT04("04",
						"未知号码指定供应商不支持购买的商品应用类型"), RESULT05("05", "未知号码指定供应商余额不足"), RESULT06("06", "未知号码流量获取失败"),
		// RESULT07("07", "特殊商品（商品不适用于全国）下单失败"),
		RESULT08("08", "自动路由未配置适合的供应商"), RESULT09("09", "下单失败");

		private String key;
		private String name;

		ROUTE_RESULT(String key, String name) {
			this.key = key;
			this.name = name;
		}

		public String value() {
			return this.key;
		}

		public String desc() {
			return this.name;
		}

		public String toString() {
			return "[" + key + "]" + name;
		}
	}

	public enum RECHARGE_RESULT {
		RESULT00("00", "商品流量获取成功"), RESULT01("01", "未知号码未指定路由"), RESULT02("02", "未知号码指定供应商未开通"), RESULT03("03",
				"未知号码指定供应商合同到期"), RESULT04("04",
						"未知号码指定供应商不支持购买的商品应用类型"), RESULT05("05", "未知号码指定供应商余额不足"), RESULT06("06", "未知号码流量获取失败"),
		// RESULT07("07", "特殊商品（商品不适用于全国）流量获取失败"),
		RESULT08("08", "自动路由未配置适合的供应商"), RESULT09("09", "商品流量获取失败"), RESULT97("97", "受理中(超时)"), RESULT98("98",
				"受理中(超时)"), RESULT99("99", "受理中");

		private String key;
		private String name;

		RECHARGE_RESULT(String key, String name) {
			this.key = key;
			this.name = name;
		}

		public String value() {
			return this.key;
		}

		public String desc() {
			return this.name;
		}

		public String toString() {
			return "[" + key + "]" + name;
		}
	}

	/** 流量包有效期 */
	public static final Map<String, String> EFFMODECD = new HashMap<String, String>();
	static {
		EFFMODECD.put("1", "当月有效");
		EFFMODECD.put("2", "30天内有效");
		EFFMODECD.put("3", "当月及次月有效");
	}

	/** 系统参数 */
	public interface PARAM {
		public static final String SYSTEM_UPDATING = "SYSTEM_UPDATING";
		public static final String TEST_CUSTOMER_LOGINIDS = "TEST_CUSTOMER_LOGINIDS";
		public static final String UPDATING_ORDER_MSG = "UPDATING_ORDER_MSG";
	}

	/** 充值状态 */
	public static final String RECHARGE_STATUS = "rechrgSts";

	// SFTP配置
	public interface SFTP_CONFIG {
		String SFTP_HOST_IP = "SFTP_HOST_IP";// FTP的ip地址
		String SFTP_HOST_PORT = "SFTP_HOST_PORT";// FTP的端口
		String SFTP_HOST_USERNAME = "SFTP_HOST_USERNAME";// FTP用户名
		String SFTP_HOST_USERPSWD = "SFTP_HOST_USERPWD";// FTP密码
		/**
		 * 上传路径配置
		 */
		String SFTP_UPLOAD_MCDS_PATH = "SFTP_UPLOAD_MCDS_PATH";
		String SFTP_UPLOAD_MCDS_NGINX = "SFTP_UPLOAD_MCDS_NGINX";
		String SFTP_UPLOAD_ITEM = "SFTP_UPLOAD_ITEM";

		String SFTP_PREFIX_IN = "FTP_PREFIX_IN"; // 内网访问
		String SFTP_PREFIX_OUT = "FTP_PREFIX_OUT"; // 外网访问

		// 文件上传下载
		String SFTP_FILE_HOST_IP = "SFTP_HOST_IP";// FTP的ip地址
		String SFTP_FILE_HOST_PORT = "SFTP_HOST_PORT";// FTP的端口
		String SFTP_FILE_HOST_USERNAME = "SFTP_HOST_USERNAME";// FTP用户名
		String SFTP_FILE_HOST_USERPSWD = "SFTP_HOST_USERPWD";// FTP密码
		/**
		 * 上传路径配置
		 */
		String SFTP_FILE_UPLOAD_MCDS_PATH = "SFTP_UPLOAD_MCDS_PATH";
		String SFTP_FILE_UPLOAD_MCDS_NGINX = "SFTP_UPLOAD_MCDS_NGINX";

		String SFTP_FILE_PREFIX_IN = "FTP_PREFIX_IN"; // 内网访问
		String SFTP_FILE_PREFIX_OUT = "FTP_PREFIX_OUT"; // 外网访问

	}

	public interface MSG_TEMPLATE_ID {
		/** 内部客户充值通知默认模版Id */
		String RECHARGENOTICE_DEFAULT1 = "7438";
		/** 预付款客户充值通知默认模版Id */
		String RECHARGENOTICE_DEFAULT2 = "7436";
		/** 客户自定义充值通知模版Id */
		String RECHARGENOTICE_CUST = "7437";
		/** 供应商预付款临界值通知 */
		String SUP_AMT_NTC = "24169";
		/** 客户预付款临界值通知 */
		String CUST_AMT_NTC = "24171";
		/** 客户日使用金额通知 */
		String CUST_DAY_NTC = "24170";
	}

	public static final Map<String, String> RECHRGSTS = new HashMap<String, String>();
	static {
		RECHRGSTS.put("00", "");
		RECHRGSTS.put("01", "未知号码未指定路由");
		RECHRGSTS.put("02", "未知号码指定供应商未开通");
		RECHRGSTS.put("03", "未知号码指定供应商合同到期");
		RECHRGSTS.put("04", "未知号码指定供应商不支持购买的商品应用类型");
		RECHRGSTS.put("05", "未知号码指定供应商余额不足");
		RECHRGSTS.put("06", "未知号码流量获取失败");
		RECHRGSTS.put("07", "特殊商品（商品不适用于全国）流量获取失败");
		RECHRGSTS.put("08", "自动路由未配置适合的供应商");
		RECHRGSTS.put("09", "商品流量获取失败");
	}
	public static final String SUPPLIER_ACCOUNT_LOCK = "FLOW_SUP_ACT_LOCK";
	public static final String FLOW_LOCKED_KEYS = "FLOW_LOCKED";
}
